package tetris.controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class MenuController implements ActionListener {

    private MainController mainController;
    public MenuController(MainController cont){
        this.mainController = cont;
    }

    public void actionPerformed(ActionEvent ae) {
        if(ae.getActionCommand().equals("One Player")){
            mainController.newGame(mainController.ONE_PLAYER);
        }else if(ae.getActionCommand().equals("Two Player")){
            mainController.newGame(mainController.TWO_PLAYER);
        }else if(ae.getActionCommand().equals("Network")){
            mainController.newGame(mainController.NETWORK_GAME);
        }else if(ae.getActionCommand().equals("Exit")){
            System.exit(0);
        }else if(ae.getActionCommand().equals("Resume")){
            mainController.backToGame();
        }
    }
    
}
